// import com.alibaba.druid.sql.ast.SQLCommentHint;
// import com.alibaba.druid.sql.ast.SQLExpr_ptr ;
// import com.alibaba.druid.sql.ast.SQLObjectImpl;
// import com.alibaba.druid.sql.ast.SQLReplaceable;
// import com.alibaba.druid.sql.ast.expr.SQLBinaryOpExpr;
// import com.alibaba.druid.sql.ast.expr.SQLIntegerExpr;
// import com.alibaba.druid.sql.visitor.SQLASTVisitor;

// import java.util.ArrayList;
// import java.util.std::list;
#pragma once

#include <string>
#include <list>

#include "../SQLExpr.h"
#include "../SQLExprImpl.h"
#include "../Object.h"
#include "../SQLName.h"
#include "../SQLObjectImpl.h"
#include "../SQLReplaceable.h"
#include "../SQLCommentHint.h"

class SQLASTVisitor;

class SQLSelectGroupByClause  : virtual public  SQLObjectImpl  , virtual public  SQLReplaceable {
  public:
    SQLExpr_list_ptr  items ;
    SQLExpr_ptr having;
    BOOL_ptr withRollUp;
    BOOL_ptr withCube;

    BOOL_ptr distinct;
    BOOL_ptr paren;
    SQLCommentHint* hint;

    SQLSelectGroupByClause() ;
  SHAREDOBJECT(SQLSelectGroupByClause);
    
    void accept0(SQLASTVisitor_ptr  visitor)override ;

    BOOL_ptr isDistinct() ;

    void setDistinct(BOOL_ptr distinct) ;

    BOOL_ptr isWithRollUp() ;

    void setWithRollUp(BOOL_ptr withRollUp) ;

    BOOL_ptr isWithCube() ;

    void setWithCube(BOOL_ptr withCube) ;

    SQLExpr_ptr getHaving() ;

    void setHaving(SQLExpr_ptr having) ;

    void addHaving(SQLExpr_ptr condition) ;

    SQLExpr_list_ptr getItems() ;

    BOOL_ptr containsItem(SQLExpr_ptr item) ;

    void addItem(SQLExpr_ptr sqlExpr) ;

    void addItem(int index, SQLExpr_ptr sqlExpr) ;

    // SQLSelectGroupByClause* clone() ;
    virtual SQLObject_ptr clone();
    
    BOOL_ptr replace(SQLExpr_ptr expr, SQLExpr_ptr target) ;

    SQLCommentHint* getHint() ;

    void setHint(SQLCommentHint* hint) ;

    BOOL_ptr isParen() ;

    void setParen(BOOL_ptr paren) ;

    
    bool equals(Object_ptr  o) ;

    
    int hashCode() ;

    
    bool containsAttribute(string_ptr name) {};
    void addBeforeComment(string_list_ptr comments) {};
    string_list_ptr getAfterCommentsDirect() {};
    string_list_ptr getBeforeCommentsDirect() {};
    void addAfterComment(string_ptr  comment) {};
    void addAfterComment(string_list_ptr comments) {};
    bool hasBeforeComment() {};
    bool hasAfterComment() {};
};
